package cn.calm.swing.osgi.generator.entity;

import cn.calm.swing.osgi.api.annotation.Required;
import cn.calm.swing.osgi.api.entity.AbstractModelObject;

public class GeneratorInfo extends AbstractModelObject {
	@Required(message = "请输入项目组!")
	private String group;
	@Required(message = "请选择项目路径!")
	private String dir;
	private Boolean frameJPA = false;
	private Boolean frameBatis = false;
	private Boolean frameHibernate = false;
	private Boolean frameSping = false;
	private Boolean frameStruts = false;
	@Required(message = "请输入主机名!")
	private String hostname;
	@Required(message = "请输入端口!")
	private Integer port;
	@Required(message = "请输入数据库!")
	private String database;
	@Required(message = "请输入用户名!")
	private String username;
	@Required(message = "请输入密码!")
	private String password;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		String oldValue = this.username;
		this.username = username;
		firePropertyChange("username", oldValue, this.username);
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		String oldValue = this.password;
		this.password = password;
		firePropertyChange("password", oldValue, this.password);
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		String oldValue = this.group;
		this.group = group;
		firePropertyChange("group", oldValue, this.group);
	}

	public String getDir() {
		return dir;
	}

	public void setDir(String dir) {
		String oldValue = this.dir;
		this.dir = dir;
		firePropertyChange("dir", oldValue, this.dir);
	}

	public String getHostname() {
		return hostname;
	}

	public void setHostname(String hostname) {
		String oldValue = this.hostname;
		this.hostname = hostname;
		firePropertyChange("hostname", oldValue, this.hostname);
	}

	public String getDatabase() {
		return database;
	}

	public void setDatabase(String database) {
		String oldValue = this.database;
		this.database = database;
		firePropertyChange("database", oldValue, this.database);
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		Integer oldValue = this.port;
		this.port = port;
		firePropertyChange("port", oldValue, this.port);
	}

	public Boolean getFrameJPA() {
		return frameJPA;
	}

	public void setFrameJPA(Boolean frameJPA) {
		Boolean oldValue = this.frameJPA;
		this.frameJPA = frameJPA;
		firePropertyChange("frameJPA", oldValue, this.frameJPA);
	}

	public Boolean getFrameBatis() {
		return frameBatis;
	}

	public void setFrameBatis(Boolean frameBatis) {
		Boolean oldValue = this.frameBatis;
		this.frameBatis = frameBatis;
		firePropertyChange("frameBatis", oldValue, this.frameBatis);
	}

	public Boolean getFrameHibernate() {
		return frameHibernate;
	}

	public void setFrameHibernate(Boolean frameHibernate) {
		Boolean oldValue = this.frameHibernate;
		this.frameHibernate = frameHibernate;
		firePropertyChange("frameHibernate", oldValue, this.frameHibernate);
		
	}

	public Boolean getFrameSping() {
		return frameSping;
	}

	public void setFrameSping(Boolean frameSping) {
		Boolean oldValue = this.frameSping;
		this.frameSping = frameSping;
		firePropertyChange("frameSping", oldValue, this.frameSping);
	}

	public Boolean getFrameStruts() {
		return frameStruts;
	}

	public void setFrameStruts(Boolean frameStruts) {
		Boolean oldValue = this.frameStruts;
		this.frameStruts = frameStruts;
		firePropertyChange("frameStruts", oldValue, this.frameStruts);
	}

	@Override
	public String toString() {
		return "GeneratorInfo [group=" + group + ", dir=" + dir + ", frameJPA="
				+ frameJPA + ", frameBatis=" + frameBatis + ", frameHibernate="
				+ frameHibernate + ", frameSping=" + frameSping
				+ ", frameStruts=" + frameStruts + ", hostname=" + hostname
				+ ", port=" + port + ", database=" + database + ", username="
				+ username + ", password=" + password + "]";
	}

}
